<template>
  <div id="app">
    <vheader ref="myheader"></vheader>
    <div class="h90"></div>
    <div class="contbg"><router-view /></div>
    <vfooter></vfooter>
  </div>
</template>

<script>
import Vue from 'vue'
export default {
  name: "App",
  data() {
    return {
      add:''
    };
  },
  mounted() {
    window.scrollTo(0, 0);
     Vue.ls.set('foo', 'boo');
      this.add= Vue.ls.get('foo');

  },
  watch: {
    $route(to, from) {
      if (to.path != from.path) {
        this.$refs.myheader.setNav();
      }
      let scrollContent = document.querySelector("#app");
      if (scrollContent) {
        scrollContent.scrollTop = 0;
        scrollContent.scrollLeft = 0;
      }
    },
  },

  methods: {},
};
</script>

<style lang="scss">
@import "./assets/css/reset.scss";

html,
body,
#app {
  height: 100%;
  max-width: 3000px;
  margin: 0 auto;
  overflow: auto;
  .contbg {
    // margin-top: 138px;
    min-height: 500px;
    // border-top: 2px solid #0099df;
  }
  .h90{
    width: 100%;
    height: 90px;
  }
}
</style>
